package com.gxa.clientadmin.pojo;

/*
 *
 *@author leijun
 *
 *@creating 2020/11/13 16:37
 *
 */

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.Set;

/**
 * @ClassName Admin
 * @Description TODO
 * @Author 俊
 * @Date 2020/11/13 16:37
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "tb_admin")
public class Admin implements Serializable {


    @Id
    @Column(name = "adm_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @Column(name = "adm_username")
    private String username;

    @Column(name = "adm_password")
    private String password;

    @Column(name = "adm_salt")
    private String salt;

    @Column(name = "adm_create")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date create;

    @Column(name = "adm_logindate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date loginDate;

    private Set<Role> roles;
}
